#ifndef SESSION_H
#define SESSION_H

#include <As/Http/AbstractHttpLogic.h>

#include <QTimer>

namespace As {

class Session : public AbstractHttpLogic
{
    Q_OBJECT;
public:
    Session(const QString & sid, QObject * parent = 0);

public slots:
    void request(HttpRequest req);

private slots:
    void expiry();

private:
    bool m_authorized;
    QString m_login;
    QString m_passKey;
    QString m_sid;
    QTimer m_timer;

    bool checkPass(const QString & login, const QString & pass);
    bool check(const QString & login);
};

}

#endif // SESSION_H
